'''
习题第4练:统计1-4组成的三位数
需求:有四个数字:1、2、3、4，统计能组成多少个互不相同且无重复数字的三位数?各是多少?
'''

count=0

for ones_place in range(1,5):
	for tens_place in range(1,5):
		for hundreds_place in range(1,5):
			if ones_place!=tens_place and tens_place!=hundreds_place and ones_place!=hundreds_place:
				# print(f'{hundreds_place}{tens_place}{ones_place}')
				count+=1

print(count)
